const webpack = require('webpack')
const { merge } = require('webpack-merge')
const common = require('./webpack.common')

module.exports = merge(common, {
  mode: 'development',
  devtool: 'cheap-eval-module-source-map',
  devServer: {
    open: true, // 自动打开浏览器
    hot: true, // HMR
    contentBase: './public'
  },
  plugins: [new webpack.HotModuleReplacementPlugin()]
})
